pub fn dp_rec_mc(amount: u32) -> u32 {
    let denominations = vec![100, 50, 30, 20, 10, 5, 2, 1];
    let mut count = 0;
    let mut result = Vec::new();
    let mut remaining = amount;

    for &denomination in denominations.iter() {
        if remaining >= denomination {
            let num_of_this_denom = remaining / denomination;
            count += num_of_this_denom as u32;
            for _ in 0..num_of_this_denom {
                result.push(denomination);
            }
            remaining %= denomination;
        }
    }

    count
}
